package com.wyz.design.patterns.behaviou.bridgepattern;

/**
 * @ClassName BridgePatternTest
 * @Description 桥接模式测试类
 * @Author wangyuezheng
 * @Date 2021/4/27 17:30
 */

public class BridgePatternTest {

    public static void main(String[] args) {
        Phone p = new ButtonPhone(new Nokia());
        p.open();
        p.call();
        p.close();
        p = new SlidePhone(new Nokia());
        p.open();
        p.call();
        p.close();

        p = new SmartPhone(new Huawei());
        p.open();
        p.call();
        p.close();

    }
}
